#ifndef MOUSEMOVESCROLLAREA_H
#define MOUSEMOVESCROLLAREA_H

#include <QScrollArea>
#include <qqtcore.h>
#include <qqtcolorwidget.h>

class MouseMoveScrollArea : public QScrollArea
{
    Q_OBJECT
public:
    explicit MouseMoveScrollArea ( QWidget* parent = nullptr );

    QQtColorWidget* currentWidget() {
        return mCurrentWidget;
    }
    void setShowCurrentWidget ( bool show = true ) {
        mCurrentWidget->setHidden ( show );
    }

signals:

public slots:

    // QWidget interface
protected:
    virtual void mousePressEvent ( QMouseEvent* event ) override;
    virtual void mouseReleaseEvent ( QMouseEvent* event ) override;
    virtual void mouseMoveEvent ( QMouseEvent* event ) override;

private:
    int mY ;

private:
    QQtColorWidget* mCurrentWidget;
};

#endif // MOUSEMOVESCROLLAREA_H
